﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using LinFu.IoC.Configuration;
using LinFu.IoC.Interfaces;
using LinFu.IoC;
namespace CoreEx.Database.Client.Implementation
{
    [Factory(typeof(IParameterExtractor))]
    public class ParameterExtractorFactory : IFactory<IParameterExtractor>
    {
        public IParameterExtractor CreateInstance(IFactoryRequest request)
        {
            var parameterExtractor = new ParameterExtractor
                                         {
                                             Connection =
                                                 request.Container.GetService<IDbConnection>(request.ServiceName)
                                         };
            return parameterExtractor;
        }
    }
}
